package com.ruoyi.client.mapper;


import com.ruoyi.common.core.domain.entity.EventApply;
import com.ruoyi.common.core.domain.entity.EventDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动报名Mapper接口
 * 
 * @author xukai
 * @date 2024-11-11
 */
public interface ClientEventApplyMapper
{

    /**
     * 查询活动报名,查出未取消报名的数量
     *
     * @param userId 活动报名ID
     * @param eventId 活动报名ID
     * @return 活动报名
     */
    Integer getEventApply(@Param("userId")String userId, @Param("eventId") int eventId);

    EventDetail getEventDetail(int eventId);

    int reduceRemain(int eventId);

    int insertEventApply(EventApply eventApply);

    List<EventDetail> getUnBeginEvent(String userId);

    int cancelApply(@Param("userId") String userId, @Param("eventId") Integer eventId);

    List<EventDetail>getUnSignInEvent(String userId);

    int addRemain(Integer eventId);

    List<EventDetail> getEventList();

    List<EventDetail> getUnSignOutEvent(String userId);

    int signIn(@Param("userId") String userId, @Param("eventId") Integer eventId);

    int signOut(@Param("userId") String userId, @Param("eventId") Integer eventId);

    List<EventDetail> getFinishedEvent(String userId);
}
